package co.lq.modules.quartz.domain;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.CreationTimestamp;

import lombok.Data;

/**
 * @author billy
 * @date 2019-01-07
 */
@Entity
@Data
@Table(name = "quartz_log")
public class QuartzLog implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long      id;

    /** 任务名称 */
    @Column(name = "job_name")
    private String    jobName;

    /** Bean名称 */
    @Column(name = "baen_name")
    private String    beanName;

    /** 方法名称 */
    @Column(name = "method_name")
    private String    methodName;

    /** 参数 */
    @Column(name = "params")
    private String    params;

    /** cron表达式 */
    @Column(name = "cron_expression")
    private String    cronExpression;

    /** 状态 */
    @Column(name = "is_success")
    private Boolean   isSuccess;

    /** 异常详细 */
    @Column(name = "exception_detail", columnDefinition = "text")
    private String    exceptionDetail;

    /** 耗时（毫秒） */
    private Long      time;

    /** 创建日期 */
    @CreationTimestamp
    @Column(name = "create_time")
    private Timestamp createTime;
}
